package com.example.taximeter.bean;

import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 出租车公司
 */
public class Company {

    @NotNull(message = "出租车公司id格式错误", groups =  GroupUpdate.class)
    private Integer id;//出租车公司id--主键

    @NotNull(message = "出租车公司名称格式错误", groups = {GroupCreate.class, GroupUpdate.class})
    @Length(min = 1, max = 100, message = "出租车公司名称格式错误", groups = {GroupCreate.class, GroupUpdate.class})
    private String companyname;//出租车公司名称

    @Length(min = 0, max = 100, message = "备注格式错误", groups = {GroupCreate.class, GroupUpdate.class})
    private String memo;//备注

    @Override
    public String toString() {
        return "Company{" +
                "id=" + id +
                ", companyname='" + companyname + '\'' +
                ", memo='" + memo + '\'' +
                '}';
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCompanyname() {
        return companyname;
    }

    public void setCompanyname(String companyname) {
        this.companyname = companyname;
    }
}
